#ifndef GIP_FILE_SELECTION_H
#define GIP_FILE_SELECTION_H 1

#include "gip_types.h"

/* 
   Opens a file selection dialog. The function returns only when the
   dialog has been closed.
   
   input parameters: filename -> if not an empty string, the dialog uses
   it as a preset selection.  maxlen -> maximum length for the filename
   output.  title -> title of the dialog.  extensions: comma-separated
   list of allowed extensions , like "pgm,ppm,jpg". Can be NULL to allow
   anything.
   
   output: if the filename has been selected, it returns 1 and the
   filename (up to maximum caracters) is returned in the filename string.
   If the selection is cancelled the function returns 0.  
*/

int gip_file_selection(char *filename, int maxlen, char *title, 
		       char *extensions);

#endif
